Feature: Printing red images & Docker support#4
Open
davidramiro wants to merge 5 commits intotbnobody:extendedfrom
Open
Feature: Printing red images & Docker support#4davidramiro wants to merge 5 commits intotbnobody:extendedfrom
davidramiro wants to merge 5 commits intotbnobody:extendedfrom
Conversation
|
Much appreciated! Docker should be the default since the alternative rates somewhere between stubbing your toe and being poked in the eye on the "fun" scale. You have saved untold hours of engineering effort. You rock. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, hope it's okay to make a packed PR like this, I can of course also split it up into one for each changeset.
Swapping upstream
brother_qldependencySince this seems to be the most maintained fork of the original repo, I was curious about future-proofing it a bit more. I would suggest swapping the
brother_qldependency for the more recent and better packaged brother_ql-inventree. This is totally up for debate, as the original repo vom @pklaus was working for me, except for some minor dependency issue with pillow.Docker support, arg parsing
I added a Dockerfile which keeps things fairly simple. I have noticed the PR #2, although this is now fairly outdated since you changed to Flasks config instead of manual parsing. Some command line args are needed to pass into the docker container, so I reintroduced some of those. The image uses the official python alpine as base and also downloads some fonts.
Red/"redscale" images
Since printing black/white/red images via
brother_qlCLI works very well, I was motivated to add this to the frontend. The naming and UX is up for debate, but I've introduced two new color modes,coloredandblack_and_red. Colored mode is not processing the image at all, best used with images that are already mostly black, white and red. Think warning signs and stuff. Black and red mode is turning the image to greyscale first, and then mapping midtones to red, so you can pass RGB images and have them use the 2 available colors as good as it allows.I've attached screenshots of both modes to make it a bit more clear.
Colored mode (no processing):
Red & black processing: